package de.au.fi.domain;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import org.ektorp.support.CouchDbDocument;
import org.ektorp.support.TypeDiscriminator;
import org.hibernate.validator.constraints.NotEmpty;

@JsonIgnoreProperties("typeName")
public class StockIdMapping extends CouchDbDocument{
	
	private static final long serialVersionUID = 1L;

	@NotNull
	@NotEmpty
	@TypeDiscriminator
	String tickerYahooData;
	
	
	String tickerYahooFinance;
	@NotNull
	@NotEmpty
	String isin;
	String wkn;
	String onVistaId;
	String name;
	
	public StockIdMapping()
	{
	}
	
	public String getWkn() {
		return wkn;
	}


	public void setWkn(String wkn) {
		this.wkn = wkn;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	@Override
	public String getId() {
		return this.isin;
	}

	@Override
	public void setRevision(String s) {
		// downstream code does not like revision set to emtpy string, which Spring does when binding
		if (s != null && !s.isEmpty()) super.setRevision(s);
	}

	
	public String getIsin() {
		return isin;
	}

	public void setIsin(String isin) {
		this.isin = isin;
	}


	public String getOnVistaId() {
		return onVistaId;
	}


	public String getTickerYahooData() {
		return tickerYahooData;
	}


	public void setTickerYahooData(String tickerYahooData) {
		this.tickerYahooData = tickerYahooData;
	}


	public String getTickerYahooFinance() {
		return tickerYahooFinance;
	}


	public void setTickerYahooFinance(String tickerYahooFinance) {
		this.tickerYahooFinance = tickerYahooFinance;
	}



	public void setOnVistaId(String onVistaId) {
		this.onVistaId = onVistaId;
	}
	
}
